<%--
  Created by IntelliJ IDEA.
  User: 2019302110397
  Date: 2021/12/6
  Time: 16:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page isELIgnored="false" %>
<html>
<head>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>gameList</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="all,follow">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css">
    <!-- Fontastic Custom icon font-->
    <link rel="stylesheet" href="css/fontastic.css">
    <!-- Google fonts - Poppins -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,700">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="css/custom.css">
    <!-- Favicon-->
    <link rel="shortcut icon" href="img/favicon.ico">
    <!-- Tweaks for older IEs--><!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
  </head>
  <title>比赛列表</title>

<body>
<div class="page">
  <!-- Main Navbar-->
  <header class="header">
    <nav class="navbar">
      <div class="container-fluid">
        <div class="navbar-holder d-flex align-items-center justify-content-between">
          <!-- Navbar Header-->
          <div class="navbar-header">
            <!-- Navbar Brand --><a href="#" class="navbar-brand d-none d-sm-inline-block">
            <div class="brand-text d-none d-lg-inline-block"><span>你好, </span><strong>${admin.account}</strong></div>
            <div class="brand-text d-none d-sm-inline-block d-lg-none"><strong></strong></div></a>
          </div>
          <!-- Navbar Menu -->
          <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
            <!-- Notifications-->
            <li class="nav-item dropdown"> <a id="notifications" rel="nofollow" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link"><i class="fa fa-bell-o"></i><span class="badge bg-red badge-corner">12</span></a>
              <ul aria-labelledby="notifications" class="dropdown-menu">
                <li><a rel="nofollow" href="#" class="dropdown-item">
                  <div class="notification">
                    <div class="notification-content"><i class="fa fa-envelope bg-green"></i>You have 6 new messages </div>
                    <div class="notification-time"><small>4 minutes ago</small></div>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item">
                  <div class="notification">
                    <div class="notification-content"><i class="fa fa-twitter bg-blue"></i>You have 2 followers</div>
                    <div class="notification-time"><small>4 minutes ago</small></div>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item">
                  <div class="notification">
                    <div class="notification-content"><i class="fa fa-upload bg-orange"></i>Server Rebooted</div>
                    <div class="notification-time"><small>4 minutes ago</small></div>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item">
                  <div class="notification">
                    <div class="notification-content"><i class="fa fa-twitter bg-blue"></i>You have 2 followers</div>
                    <div class="notification-time"><small>10 minutes ago</small></div>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item all-notifications text-center"> <strong>view all notifications                                            </strong></a></li>
              </ul>
            </li>
            <!-- Messages                        -->
            <li class="nav-item dropdown"> <a id="messages" rel="nofollow" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link"><i class="fa fa-envelope-o"></i><span class="badge bg-orange badge-corner">10</span></a>
              <ul aria-labelledby="notifications" class="dropdown-menu">
                <li><a rel="nofollow" href="#" class="dropdown-item d-flex">
                  <div class="msg-profile"> <img src="img/avatar-1.jpg" alt="..." class="img-fluid rounded-circle"></div>
                  <div class="msg-body">
                    <h3 class="h5">Jason Doe</h3><span>Sent You Message</span>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item d-flex">
                  <div class="msg-profile"> <img src="img/avatar-2.jpg" alt="..." class="img-fluid rounded-circle"></div>
                  <div class="msg-body">
                    <h3 class="h5">Frank Williams</h3><span>Sent You Message</span>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item d-flex">
                  <div class="msg-profile"> <img src="img/avatar-3.jpg" alt="..." class="img-fluid rounded-circle"></div>
                  <div class="msg-body">
                    <h3 class="h5">Ashley Wood</h3><span>Sent You Message</span>
                  </div></a></li>
                <li><a rel="nofollow" href="#" class="dropdown-item all-notifications text-center"> <strong>Read all messages   </strong></a></li>
              </ul>
            </li>
            <!-- Logout    -->
            <li class="nav-item"><a href="${pageContext.request.contextPath}/login" class="nav-link logout"> <span class="d-none d-sm-inline">注销</span><i class="fa fa-sign-out"></i></a></li>
          </ul>
        </div>
      </div>
    </nav>
  </header>

  <div class="page-content d-flex align-items-stretch">

    <!-- Side Navbar -->
    <nav class="side-navbar">
      <!-- Sidebar Header-->
      <div class="sidebar-header d-flex align-items-center">
        <div class="avatar"><img src="img/hpic404.jpg" alt="..." class="img-fluid rounded-circle"></div>
        <div class="title">
          <h1 class="h4">${admin.account}</h1>
          <p>${profile}</p>
        </div>
      </div>
      <!-- Sidebar Navidation Menus--><span class="heading">主要操作</span>
      <ul class="list-unstyled">
        <li ><a href="${pageContext.request.contextPath}/toMainAdmin"> <i class="icon-home"></i>主页 </a></li>
        <li><a href="${pageContext.request.contextPath}/toTeamList"> <i class="icon-grid"></i>队伍信息 </a></li>
        <li ><a href="${pageContext.request.contextPath}/toAllRefereeList"> <i class="fa fa-bar-chart"></i>裁判信息 </a></li>
        <li class="active"><a href="${pageContext.request.contextPath}/toItemList"> <i class="icon-padnote"></i>比赛列表 </a></li>
        <li ><a href="${pageContext.request.contextPath}/toGradeList"> <i class="icon-padnote"></i>成绩表 </a></li>
      </ul>
    </nav>

    <div class="content-inner">
      <!-- Page Header-->
      <header class="page-header">
        <div class="container-fluid">
          <h2 class="no-margin-bottom">比赛详情</h2>
        </div>
      </header>



      <!--  Section1 -->
      <section class="tables" style="width: 90%;margin-left: 5%">
        <div class="card">
          <div class="card-close">
            <div class="dropdown">
              <button type="button" id="closeCard1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle"><i class="fa fa-ellipsis-v"></i></button>
              <div aria-labelledby="closeCard2" class="dropdown-menu dropdown-menu-right has-shadow"><a href="#" class="dropdown-item remove"> <i class="fa fa-times"></i>Close</a><a href="#" class="dropdown-item edit"> <i class="fa fa-gear"></i>Edit</a></div>
            </div>
          </div>
          <div class="card-header d-flex align-items-center">
            <h3 class="h4">比赛信息</h3>
          </div>
          <div class="card-body">
            <div class="table-responsive">
              <table class="table table-striped">
                <thead>
                <tr>
                  <th>项目号</th>
                  <th>运动员ID</th>
                  <th>组号</th>
                  <th>出场顺序</th>
                  <th>决赛</th>
                  <th>设置分组</th>
                  <th>设置出场顺序</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="gameInformation" items="${gameInformations}">
                  <tr>
                    <td>${gameInformation.id}</td>
                    <td>${gameInformation.athleteId}</td>
                    <td>${gameInformation.groupNum}</td>
                    <td>${gameInformation.playOrder}</td>
                    <th>${gameInformation.finalGame}</th>
                    <td>
                      <button type="button" data-toggle="modal" data-target="#myModal1" class="btn btn-primary" style="text-align: center">设置</button>
                      <!-- Modal-->
                      <div id="myModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" class="modal fade text-left">
                        <div role="document" class="modal-dialog">
                          <div class="modal-content">
                            <div class="modal-header">
                              <h4 id="exampleModalLabel1" class="modal-title">设置组号</h4>
                              <button type="button" data-dismiss="modal" aria-label="Close" class="close"><span aria-hidden="true">×</span></button>
                            </div>
                            <div class="modal-body">
                              <p>请填写组号</p>
                              <form action="${pageContext.request.contextPath}/editGroupNum">
                                <div class="form-group">
                                  <label>组号</label>
                                  <input type="hidden" name="itemId" value="${gameInformation.itemId}">
                                  <input type="text" name="groupNum" placeholder="请填写组号" class="form-control">
                                  <input type="hidden" name="infoId" value="${gameInformation.id}" placeholder="请填写组号" class="form-control">
                                </div>
                                <div class="form-group">
                                  <input type="submit" value="设置" class="btn btn-primary">
                                </div>
                              </form>
                            </div>

                          </div>
                        </div>
                      </div>
                    </td>
                    <td>
                      <button type="button" data-toggle="modal" data-target="#myModal" class="btn btn-primary" style="text-align: center">设置</button>
                      <!-- Modal-->
                      <div id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" class="modal fade text-left">
                        <div role="document" class="modal-dialog">
                          <div class="modal-content">
                            <div class="modal-header">
                              <h4 id="exampleModalLabel2" class="modal-title">设置出场顺序</h4>
                              <button type="button" data-dismiss="modal" aria-label="Close" class="close"><span aria-hidden="true">×</span></button>
                            </div>
                            <div class="modal-body">
                              <p>请填写出场信息</p>
                              <form action="${pageContext.request.contextPath}/editPlayOrder">
                                <div class="form-group">
                                  <label>出场顺序</label>
                                  <input type="hidden" name="itemId" value="${gameInformation.itemId}">
                                  <input type="text" name="playOrder" placeholder="请填写出场顺序" class="form-control">
                                  <input type="hidden" name="infoId" value="${gameInformation.id}" class="form-control">
                                </div>
                                <div class="form-group">
                                  <input type="submit" value="设置" class="btn btn-primary">
                                </div>
                              </form>
                            </div>
                          </div>
                        </div>
                      </div>

                    </td>
                  </tr>
                </c:forEach>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </section>
      <!--  Section2 -->
      <section class="tables" style="width: 90%;margin-left: 5%">
        <div class="card">
          <div class="card-close">
            <div class="dropdown">
              <button type="button" id="closeCard2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle"><i class="fa fa-ellipsis-v"></i></button>
              <div aria-labelledby="closeCard2" class="dropdown-menu dropdown-menu-right has-shadow"><a href="#" class="dropdown-item remove"> <i class="fa fa-times"></i>Close</a><a href="#" class="dropdown-item edit"> <i class="fa fa-gear"></i>Edit</a></div>
            </div>
          </div>
          <div class="card-header d-flex align-items-center">
            <h3 class="h4">裁判信息</h3>
          </div>
          <div class="card-body">
            <button type="button" data-toggle="modal" data-target="#myModal2" class="btn btn-primary" style="text-align: center">添加裁判</button>
            <!-- Modal-->
            <div id="myModal2" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" class="modal fade text-left">
              <div role="document" class="modal-dialog">
                <div class="modal-content">
                  <div class="modal-header">
                    <h4 id="exampleModalLabel" class="modal-title">添加裁判</h4>
                    <button type="button" data-dismiss="modal" aria-label="Close" class="close"><span aria-hidden="true">×</span></button>
                  </div>
                  <div class="modal-body">
                    <p>请填写裁判信息</p>
                    <form action="${pageContext.request.contextPath}/addRefereeItem">
                      <div class="form-group">
                        <input type="hidden" name="certainItemId" value="${certainItemId}">
                        <label>裁判ID</label>
                        <input type="text" name="refereeId" placeholder="请填写裁判ID" class="form-control">
                      </div>
                      <div class="form-group">
                        <label>是否为主裁判</label>
                        <input type="text" name="chiefReferee" placeholder="请填写裁判类型" class="form-control">
                      </div>
                      <div class="form-group">
                        <input type="submit" value="添加" class="btn btn-primary">
                      </div>
                    </form>
                  </div>

                </div>
              </div>
            </div>
            <div class="table-responsive">
              <table class="table table-striped">
                <thead>
                <tr>
                  <th>裁判ID</th>
                  <th>操作</th>
                  <th>通知</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="referee_item" items="${referee_items}">
                  <tr>
                    <td>${referee_item.refereeId}</td>
                    <td>
                      <a href="${pageContext.request.contextPath}/deleteRefereeItem?refereeId=${referee_item.refereeId}&itemId=${referee_item.itemId}"><button type="button" class="btn btn-primary" style="alignment: right">删除裁判</button></a>
                    </td>
                    <td><a href="${pageContext.request.contextPath}#"><button type="button" class="btn btn-primary" style="alignment: right">通知裁判打分</button></a></td>
                  </tr>
                </c:forEach>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </section>



      <!-- Page Footer-->
      <footer class="main-footer">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-6">
              <p>Copyright &copy; 2021.WHU CS DB Group24 All rights reserved.</p>
            </div>
            <div class="col-sm-6 text-right">
              <p></p>
              <!-- Please do not remove the backlink to us unless you support further theme's development at https://bootstrapious.com/donate. It is part of the license conditions. Thank you for understanding :)-->
            </div>
          </div>
        </div>
      </footer>







    </div>





  </div>




</div>

<!-- JavaScript files-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/popper.js/umd/popper.min.js"> </script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/jquery.cookie/jquery.cookie.js"> </script>
<script src="vendor/chart.js/Chart.min.js"></script>
<script src="vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="js/charts-home.js"></script>
<!-- Main File-->
<script src="js/front.js"></script>

</body>
</html>

